package com.wlc.base;

/**
 * @author 王立朝 wanglichao@champion-credit.com
 * @description 基础测试
 * @date 2021-09-26 21:34
 */
public class Demo12 {

    public static void method01() {
        ok:
        for (int i = 0; i < 10; i++) {
            for (int j = 0; j < 10; j++) {
                System.out.println("i=" + i + ",j=" + j);
                if (j == 5) {
                    break ok;
                }
            }
        }
    }

    public static void method02() {
        a:
        for (int i = 0; i < 10; i++) {
            for (int j = 0; j < 10; j++) {
                System.out.println("i=" + i + ",j=" + j);
                if (j == 5) {
                    break a;
                }
            }
        }
    }

    public static void main(String[] args) {
        method02();
    }

}
